﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Web;
using CafeOnline.Domain.Models;
using CafeOnline.MvcFramework;

namespace CafeOnline.Models {
    /// <summary>
    /// 
    /// </summary>
    [Export(typeof(IUserModel))]
    public class UserModel : IUserModel {
        public static IUserModel CurentUser {
            get {
                return SessionFactory.GetSessionObject<UserModel>();
            }
        }
        /// <summary>
        /// Gets or sets the username.
        /// </summary>
        /// <value>
        /// The username.
        /// </value>
        public string Username {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the password.
        /// </summary>
        /// <value>
        /// The password.
        /// </value>
        public string Password {
            get;
            set;
        }
        /// <summary>
        /// Gets or sets a value indicating whether this instance is authenticated.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is authenticated; otherwise, <c>false</c>.
        /// </value>
        public bool IsAuthenticated {
            get;
            set;
        }
    }
}